#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDebug>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QNetworkAccessManager>
#include <QHttpMultiPart>
#include <QDragEnterEvent>
#include <QDropEvent>

#include "xqat_weather.h"
#include "xqat_figure_bed.h"
#include "xqat_blog.h"


namespace Ui
{
    class MainWindow;
}



struct file_path_file_t {                       /* struct file path data and file name data */
    QString master_path;                        /* The program path */
    QString setting_path;                       /* The program file path */
    QString excel_path;                         /* Export excel file path */
    QString gf_path;                            /* Export .gf file path */
    QString setting_file_name;                  /* Export file name data */
};

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_pushButton_1_pressed();

    void on_pushButton_2_pressed();

    void on_pushButton_3_pressed();

    void on_pushButton_4_pressed();

    void on_pushButton_5_pressed();

    void on_pushButton_6_pressed();

    void on_pushButton_7_pressed();

    void on_pushButton_pressed();

    void weather_replyFinished(QNetworkReply *reply);

    void figure_bed_replyFinished(QNetworkReply *reply);

    void ascii_art_replyFinished(QNetworkReply *reply);

    void on_pushButton_11_pressed();

private:
    Ui::MainWindow *ui;

    void sys_init(void);

    void set_weather(QString city);

    void dragEnterEvent(QDragEnterEvent *event);

    void dropEvent(QDropEvent *event);

    void initTranslator(void);

    void set_figure_bed(QString img);

    void set_ascii_art(QString ascii, QString art);

    xqat_weather xqat_weather_c;
    xqat_Figure_bed xqat_Figure_bed_c;
    xqat_blog xqat_blog_c;
};

#endif // MAINWINDOW_H
